﻿Public Class PhieuNhap

    Private Sub PhieuNhap_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'GPPNhaThuocDataSet.DMHangHoa' table. You can move, or remove it, as needed.
        Me.DMHangHoaTableAdapter.Fill(Me.GPPNhaThuocDataSet.DMHangHoa)
        'TODO: This line of code loads data into the 'GPPNhaThuocDataSet.DMDoiTuong' table. You can move, or remove it, as needed.
        Me.DMDoiTuongTableAdapter.Fill(Me.GPPNhaThuocDataSet.DMDoiTuong)
        'TODO: This line of code loads data into the 'GPPNhaThuocDataSet.Con' table. You can move, or remove it, as needed.
        Me.ConTableAdapter.Fill(Me.GPPNhaThuocDataSet.Con)
        'TODO: This line of code loads data into the 'GPPNhaThuocDataSet.Cha' table. You can move, or remove it, as needed.
        Me.ChaTableAdapter.Fill(Me.GPPNhaThuocDataSet.Cha)

    End Sub
    Public Sub New()
        InitializeComponent()
        Me.setSoTab(1)
        Me.setObj(Me.GPPNhaThuocDataSet, Me.GPPNhaThuocDataSet.Cha, Me.ChaBindingSource, Me.TableAdapterManager, Me.ChaTableAdapter, Me.MaITextEdit, Me.TenITextEdit)
        Me.setTab1(Me.GPPNhaThuocDataSet.Con, Me.FKConConBindingSource, Me.ConTableAdapter)
        Me.setColumnsChangeTab1(New ArrayList() From {"soluong", "dongia"})
        Me.setColumnValueTab1(Me.colEx1ChiTiet01, Me.colthanhtien)
    End Sub
    Public Overrides Sub setSubSau_TaoMoi()
        Me.setMacDinhCotAn("ma", System.Guid.NewGuid())
    End Sub

    
    Private Sub IGridViewChiTiet01_InitNewRow(sender As Object, e As DevExpress.XtraGrid.Views.Grid.InitNewRowEventArgs) Handles IGridViewChiTiet01.InitNewRow
        Me.IGridViewChiTiet01.SetFocusedRowCellValue("soluong", 0)
        Me.IGridViewChiTiet01.SetFocusedRowCellValue("dongia", 0)
        Me.IGridViewChiTiet01.SetFocusedRowCellValue("thanhtien", 0)
    End Sub
End Class
